class ProductController < ApplicationController
  skip_before_filter :require_login

  def index
    type = params[:type]
    if type == nil
      @products = Product.find_all_by_available(1)
    else
      @products = Product.find_all_by_product_type_and_available(type, 1)
    end
  end

  def show
    @product = Product.find(params[:pro_id])
  end
end
